*Table 3 and Figure 5

*Initial Calculations

*Model 2
eststo m1: xtreg agg_implem_wo sum_shame lag_runner lag_l* infant_wb lag_constraint merged_gdp, fe cluster(pam_caseid)
unique pam_caseid if e(sample)==1
vif, uncentered 
margins, at(sum_shame=(0(.5)7.5)) saving(m1, replace)
marginsplot, recastci(rline) recast(line) ciopts(lpattern(dash) lcolor(black)) ///
title("") plotopts(lcolor(black) plotregion(color(white)) graphregion(color(white))) ///
xtitle(Shaming (t-1)) ytitle(Aggregate Implementation Rate) ///
ylabel(0(25)100) xlabel(0(1)7) ///
addplot(hist sum_shame if e(sample)==1, percent fcolor(none) lcolor(black) ///
yaxis(2) ytitle(Percent of Sample, axis(2)) yscale(axis(2) alt)) legend(off)
graph save "m1.gph", replace

*Model 3
eststo m2: xtreg agg_implem_wo sum_reso lag_runner lag_l* infant_wb lag_constraint merged_gdp, fe cluster(pam_caseid)
unique pam_caseid if e(sample)==1
vif, uncentered 
margins, at(sum_resource=(0(.5)6.5)) saving(m2, replace)
marginsplot, recastci(rline) recast(line) ciopts(lpattern(dash) lcolor(black)) ///
title("") plotopts(lcolor(black) plotregion(color(white)) graphregion(color(white))) ///
xtitle(Resources (t-1)) ytitle(Aggregate Implementation Rate) ///
ylabel(0(25)100) xlabel(0(1)6) ///
addplot(hist sum_resource if e(sample)==1, percent fcolor(none) lcolor(black) ///
yaxis(2) ytitle(Percent of Sample, axis(2)) yscale(axis(2) alt)) legend(off) 
graph save "m2.gph", replace

*Model 4
eststo m3: xtreg agg_implem_wo sum_coord lag_runner lag_l* infant_wb lag_constraint merged_gdp, fe cluster(pam_caseid)
unique pam_caseid if e(sample)==1
vif, uncentered 
margins, at(sum_coord=(0(.5)6.5)) saving(m3, replace)
marginsplot, recastci(rline) recast(line) ciopts(lpattern(dash) lcolor(black)) ///
title("") plotopts(lcolor(black) plotregion(color(white)) graphregion(color(white))) ///
xtitle(Coordinating (t-1)) ytitle(Aggregate Implementation Rate) ///
ylabel(0(25)100) xlabel(0(1)6) ///
addplot(hist sum_coord if e(sample)==1, percent fcolor(none) lcolor(black) ///
yaxis(2) ytitle(Percent of Sample, axis(2)) yscale(axis(2) alt)) legend(off)
graph save "m3.gph", replace

*Table 3
esttab m* using "Table 3.tex", se r2 replace
est clear

*Wooldrdige Hausman Test Statistics

*Model 2
eststo m1: xtreg agg_implem_wo sum_shame lag_runner lag_l* infant_wb lag_constraint merged_gdp, cluster(pam_caseid)
xtoverid

*Model 3
eststo m2: xtreg agg_implem_wo sum_reso lag_runner lag_l* infant_wb lag_constraint merged_gdp,  cluster(pam_caseid)
xtoverid

*Model 4
eststo m3: xtreg agg_implem_wo sum_coord  lag_runner lag_l* infant_wb lag_constraint merged_gdp, cluster(pam_caseid)
xtoverid

esttab m*
est clear

*Figure 5
graph combine m1.gph m2.gph m3.gph, rows(1) graphregion(color(white))
graph export "Figure 5.pdf", replace
